Skip to content

feat(memory): learn evidence-backed recovery policies (#1022)#1109

Merged
shaun0927 merged 2 commits into
feat/1018-recovery-candidate-rankingfrom
feat/1022-recovery-policy-learning
May 13, 2026
Merged

feat(memory): learn evidence-backed recovery policies (#1022)#1109
shaun0927 merged 2 commits into
feat/1018-recovery-candidate-rankingfrom
feat/1022-recovery-policy-learning

Conversation

@shaun0927
Copy link
Copy Markdown
Owner

@shaun0927 shaun0927 commented May 12, 2026

Progress / Review status

Auto-refreshed 2026-05-13 — owner comments cleaned up to reduce review noise.

Field Value
Branch feat/1022-recovery-policy-learningfeat/1018-recovery-candidate-ranking
Draft no
CI
Mergeable ❌ CONFLICTING
Review decision
Codex (latest)
Other reviewers (latest)
Head 8565816 — Learn evidence-backed recovery ranking policies
Commits 1

Owner comment cleanup: 0 issue + 0 inline review comments deleted. Outstanding feedback from automated/external reviewers above is unchanged.


Summary\n- Adds RecoveryPolicyLearner for evidence-backed recovery outcome promotion and persistence.\n- Lets candidate ranking accept promoted policies as a bounded score boost.\n- Keeps learned policies advisory-only and unable to bypass safety/risk gates.\n\nCloses #1022.\n\nStacked on #1088 because it biases the recovery candidate ranker.\n\n## Validation\n- npm test -- --runTestsByPath tests/recovery/policy-learner.test.ts tests/recovery/candidate-ranker.test.ts\n- npm run build\n\n## Live OpenChrome verification\n- Not run in this PR session; requires two-run stale-ref fixture transcript after the stacked foundations land.\n\n## Safety\n- Only evidence-backed outcomes are recorded.\n- Ambiguous outcomes do not promote.\n- Policies only bias ranking; they do not auto-execute actions and do not bypass risk gates.

Add a bounded recovery policy learner so repeated evidence-backed recoveries can bias future candidate ranking without bypassing safety gates or executing actions.\n\nConstraint: Learned recovery policy must be advisory only and must not store sensitive page content or credentials.\nRejected: A separate autonomous recovery memory/executor | duplicates PatternLearner direction and risks unsafe automatic action.\nConfidence: high\nScope-risk: narrow\nDirective: Learned policies may rank candidates but must never override risk gates or opt-in execution controls.\nTested: npm test -- --runTestsByPath tests/recovery/policy-learner.test.ts tests/recovery/candidate-ranker.test.ts; npm run build\nNot-tested: Two-run live OpenChrome policy promotion transcript.
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@qodo-code-review
Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@shaun0927
Copy link
Copy Markdown
Owner Author

Merge rationale (stack consolidation)

Intent. Closes #1022 — adds a RecoveryPolicyLearner that promotes and persists evidence-backed recovery outcomes, and lets the candidate ranker accept those promoted policies as a bounded score boost.

Why this is correct.

  • Policies are advisory-only — they cannot bypass safety/risk gates per the PR description. The ranker still has final say.
  • Score boost is bounded (so a learned policy can nudge but not dominate the ranking).
  • Persistence layer adds learning continuity across sessions without changing the candidate-ranker contract.
  • Validation: tests/recovery/policy-learner.test.ts + tests/recovery/candidate-ranker.test.ts + npm run build.
  • Scope contained: 4 files, +263/-11. No Codex P0/P1/P2 outstanding.

CI. Targets the recovery-candidate-ranking feature branch; CI workflow only runs on main/develop PRs.

@shaun0927 shaun0927 merged commit ee60444 into feat/1018-recovery-candidate-ranking May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant